using System;
using System.Text;
using TccAg.VO;
using TccAg.DA;
using System.Data;
using System.Collections;
using System.Collections.Generic;

namespace TccAg.BR
{
    public class SolucaoBR
    {
        private SolucaoDA solucaoDA = new SolucaoDA();

        //INSERIR 
        public int inserir(SolucaoVO solucao)
        {
            try
            {
                return solucaoDA.inserir(solucao);
            }
            catch (Exception ex)
            {               
                throw ex;
            }
        }

        //ATUALIZAR 
        public int atualizar(SolucaoVO solucao)
        {
            try
            {
                return solucaoDA.atualizar(solucao);
            }
            catch (Exception ex)
            {                
                throw ex;
            }
        }

        //EXCLUIR 
        public int excluir(SolucaoVO solucao)
        {
            try
            {
                return solucaoDA.excluir(solucao);
            }
            catch (Exception ex)
            {                
                throw ex;
            }
        }

        //LOAD ALL 
        public List<SolucaoVO> loadAll()
        {
            try
            {
                return solucaoDA.loadAll();
            }
            catch (Exception ex)
            {               
                throw ex;
            }
        }

        //LOAD BY PK
        public SolucaoVO loadByPk(SolucaoVO solucao)
        {
            try
            {
                return solucaoDA.loadByPk(solucao);
            }
            catch (Exception ex)
            {               
                throw ex;
            }
        }

        //LOAD BY FK
        public List<SolucaoVO> loadByFk(SolucaoVO solucao)
        {
            try
            {
                return solucaoDA.loadByFk(solucao);
            }
            catch (Exception ex)
            {                
                throw ex;
            }
        }

        //DATATABLE LOAD ALL 
        public DataTable dataTableLoadAll()
        {
            try
            {
                return solucaoDA.dataTableLoadAll();
            }
            catch (Exception ex)
            {                
                throw ex;
            }
        }

    }
}
